package cn.com.citydo.base.entity;

import cn.com.citydo.base.util.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author XuJing
 * @since 2018-05-04 15:54
 */
@Data
public class BaseEntity implements Serializable {

    private static final long serialVersionUID = -7638721410963863153L;

    private String id;

    private Date createTime;

    private Date modifyTime;

    @TableLogic
    private Integer isDel;

    public JSONObject toJSON() {
        return JSONUtil.toJSONObject(this);
    }

}
